import 'package:flutter/material.dart';
import 'package:huajianshe_app/common/load_image.dart';
import 'package:huajianshe_app/common/res.dart';

import 'model/UserModel.dart';

class LabelListItem extends StatelessWidget {

  final LabelListData? data;

  const LabelListItem(this.data, {Key? key, }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    String names = data?.labels?.map((e) => e.userInfo?.nickname).toList().join(',') ?? '';
    return
        InkWell(onTap: () => detail(), child: Padding(padding: EdgeInsets.symmetric(vertical: 9), child: Row(children: [
          Expanded(child: Column(mainAxisSize: MainAxisSize.min, children: [
            Text('${data?.name}(${data?.num})', style: TS(15, C.gray0D0E15)),
            H(1),
            Text(names, style: TS(12, C.gray666))
          ])),
          LoadImage('ic_gray_right_arrow')
        ])));
  }

  detail() {

  }
}